package com.cuit.mapper;

import com.cuit.pojo.Tag;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TagMapper {
    @Select("select * from tag")
    public List<Tag> findAll();
    @Select("select * from tag where id=#{id}")
    public Tag findById(int id);
    @Insert("insert into tag(id, name) VALUES (#{id},#{name})")
    public int insertTag(Tag tag);
    @Delete("delete from tag where id=#{id}")
    public int deleteById(int id);
    @Update("update tag set name=#{name} where id = #{id}")
    public int updateById(Tag tag);
}
